package net.hn.hnms.biz.indicator.dao;

import net.hn.hnms.biz.indicator.entity.SysIndicatorRoles;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 智呈物联 nzw
 * @date 2022/9/19
 */
@Repository
public interface SysIndicatorRolesMapper extends JpaRepository<SysIndicatorRoles,Long> {

    @Query(value = "SELECT\n" +
            "\t* \n" +
            "FROM\n" +
            "\tsys_indicator_roles \n" +
            "WHERE\n" +
            "\tID = ?1 \n" +
            "ORDER BY\n" +
            "\tcreate_time",nativeQuery = true)
    List<SysIndicatorRoles> queryAll(Long id);

    List<SysIndicatorRoles> queryAllByIndicatorId(Long id);
}
